Virtual Directories

In RCEdit a virtual directory is simply a replacement of a partial file path with an URL. Consider the following example. A user is running Personal Web Server that is installed in c:\inetpub\wwwroot\. The user accesses their PWS via http://localhost/ or http://127.0.0.1/. The user is working on their default web page which has been saved to c:\inetpub\wwwroot\default.asp.

Attempting to preview the ASP document without setting up and enabling a Virtual Directory would simply result in the web browser window presenting the user with a Save As dialog box. Creating a virtual directory will allow the user to preview the ASP document in a web server context with all ASP code compiled and sent to the web browser as textual output.

Setting up a virtual directory is simple. Access the Options dialog from the View Menu and click on the Virtual Directories tab. Once the add button is clicked the user will be presented with two dialogs where they can pick the file system directory and the URL for the virtual directory. The image below shows what the final Virtual Directory setup would like.

Virtual Directories Tab in the Options Dialog

Whenever a user toggles the document from source mode to preview mode RCEdit determines the fully qualified URL to the ASP file. c:\inetpub\wwwroot\default.asp is previewed as http://localhost/default.asp. The status bar seen at the bottom of the document window while in preview mode would reflect http://localhost/default.asp as the active URL.

Virtual directories must be enabled for this feature to work. Virtual Directories can be enabled from the Virtual Directories tab in the Options dialog or from the Document Assistant toolbar. Disabling virtual directories does not delete previously created settings; it simply caused RCEdit to ignore the settings.

Document Assistant Toolbar

The top two bottom icons on the above toolbar image are used
to toggle between disabled Virtual Directories and enabled Virtual Directories.

This feature also works with network paths and mapped network directories making it a very useful feature for authors who routinely work on IIS Web Servers available on their network.